/**
 * Copyright &copy; 2018 thinkis All rights reserved.
 */
package com.thinkis.modules.edu.entity;

import com.thinkis.modules.sys.utils.DictUtils;
import org.hibernate.validator.constraints.Length;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.thinkis.common.persistence.DataEntity;

/**
 * 报名名单Entity
 * @author liuzhiping
 * @version 2018-08-18
 */
public class EnrollList extends DataEntity<EnrollList> {
	
	private static final long serialVersionUID = 1L;
	private String name;		// 学员姓名
	private String sex;		// 性别
	private Date birthday;		// 生日
	private String guardianType;		// 监护人类型（父亲、母亲、其他）
	private String guardianName;		// 监护人姓名
	private String guardianTel;		// 监护人手机
	private String guardianEmail;		// 监护人邮箱
	private String courseType;		// 课程类型
	private String status;		// 状态
	private String courseTypeLabel; //课程类型名称
	
	public EnrollList() {
		super();
	}

	public EnrollList(String id){
		super(id);
	}

	@Length(min=0, max=255, message="学员姓名长度必须介于 0 和 255 之间")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@Length(min=0, max=1, message="性别长度必须介于 0 和 1 之间")
	public String getSex() {
		return sex;
	}

	public void setSex(String sex) {
		this.sex = sex;
	}

	@JsonFormat(pattern = "yyyy-MM-dd")
	public Date getBirthday() {
		return birthday;
	}

	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}
	
	@Length(min=0, max=255, message="监护人类型（父亲、母亲、其他）长度必须介于 0 和 255 之间")
	public String getGuardianType() {
		return guardianType;
	}

	public void setGuardianType(String guardianType) {
		this.guardianType = guardianType;
	}
	
	@Length(min=0, max=255, message="监护人姓名长度必须介于 0 和 255 之间")
	public String getGuardianName() {
		return guardianName;
	}

	public void setGuardianName(String guardianName) {
		this.guardianName = guardianName;
	}
	
	@Length(min=0, max=255, message="监护人手机长度必须介于 0 和 255 之间")
	public String getGuardianTel() {
		return guardianTel;
	}

	public void setGuardianTel(String guardianTel) {
		this.guardianTel = guardianTel;
	}
	
	@Length(min=0, max=255, message="监护人邮箱长度必须介于 0 和 255 之间")
	public String getGuardianEmail() {
		return guardianEmail;
	}

	public void setGuardianEmail(String guardianEmail) {
		this.guardianEmail = guardianEmail;
	}
	
	@Length(min=0, max=100, message="课程类型长度必须介于 0 和 100 之间")
	public String getCourseType() {
		return courseType;
	}

	public void setCourseType(String courseType) {
		this.courseType = courseType;
	}
	
	@Length(min=0, max=1, message="状态长度必须介于 0 和 1 之间")
	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getCourseTypeLabel() {
		return courseTypeLabel;
	}

	public void setCourseTypeLabel(String courseTypeLabel) {
		this.courseTypeLabel = courseTypeLabel;
	}

	public String getSexLabel(){
		return DictUtils.getDictLabel(this.getSex(),"sex","其他");
	}

	public String getGuardianTypeLabel(){
		return DictUtils.getDictLabel(this.getGuardianType(),"guardian_type","其他");
	}

	public String getStatusLabel(){
		return DictUtils.getDictLabel(this.getStatus(),"status","其他");
	}
}